<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title>javascript使用方式</title>
	</head>
	<body>
		<h2> JavaScript的三种使用方式</h2>
		<h3>1 script标签</h3>
		<script type="text/javascript">
			var name="xxx";
			var date=new Date();
			document.write(name+"<br/>");
			document.write(date+"<br/>");
			
		</script>
		
		<h3>2 外部js</h3>
		
		<script src="js/myjs.js" type="text/javascript"></script>
		
		<h3>3 在标签事件属性中</h3>
		<input type="button" value="按钮" onclick="alert('hello js')" />
	</body>
</html>
